package com.cloudfun.campusshare.common.constant;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * Created by linyangping on 2019/10/21.
 */
public final class BaseConstant {

    public static final String DEFAULT_CLIENT_SALT = "hyperch@in"; // 默认token加密密码
    public static final String DEFAULT_PRIVATE_KEY_PASSWORD = "123"; //默认加密私钥的密码
    public static final String DEFAULT_PASSWORD_SALT = "hyperch@in"; //密码盐值

    public static final String X_ACCESS_TOKEN = "x-access-token";
    public static final String T_ACCESS_TOKEN = "t-access-token";
    public static final String FOLDER_UPLOAD = "upload"; // 用户上传文件 基准文件夹

    public static final String PHONE_REGEX_PATTERN = "^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$";
    public static final String PASSWORD_REGEX_PATTERN = "^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,20}$";
    public static final String EMAIL_REGEX_PATTERN = ".*@.*";
    public static final String ALPHABET_DIGITAL_CHINESE = "^[a-z0-9A-Z\u4e00-\u9fa5]+$";
    public static final String CHINESE = "^[\u4e00-\u9fa5]+$";
    public static final String ALPHABET_DIGITAL = "^[a-z0-9A-Z]+$";
    public static final String DIGITAL = "^[0-9]+$";

    public static final String EXPORT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static final long SECONDS_A_DAY = 24 * 60 * 60;
    public static final long MILLI_SECONDS_A_DAY = SECONDS_A_DAY * 1000;

    /**
     * 提现手续费率
     */
    public static final Double HANDING_FEE_RATE = 0.006;

    // 设备类型
    // 波轮6.5公斤洗衣机-无消毒
    public static final String BXY6_5_NAME = "BXY6-5";
    // 波轮6.5公斤洗衣机-有消毒
    public static final String BXYD6_5_NAME = "BXYD6-5";
    // 波轮6.5公斤洗鞋机
    public static final String BXX6_5_NAME = "BXX6-5";
    // 滚筒8公斤洗衣机
    public static final String GXY8_NAME = "GXY8";
    // 滚筒8公斤干衣机
    public static final String GGY8_NAME = "GGY8";
    // 滚筒13.5公斤洗衣机
    public static final String GXY13_5_NAME = "GXY13-5";
    // 滚筒13.5公斤干衣机
    public static final String GGY13_5_NAME = "GGY13-5";
    // 滚筒6公斤干衣机
    public static final String GGY6_NAME = "GGY6";

    // 莱鸟单泵
    public static final String PUMP1_LA_NAME = "PUMP_LA_1";
    // 莱鸟双泵
    public static final String PUMP2_LA_NAME = "PUMP_LA_2";

    public static final ScheduledExecutorService SCHEDULED_EXECUTOR = Executors.newScheduledThreadPool(Runtime.getRuntime().availableProcessors() + 1);

}
